package com.ytu.cloudbackup.face;

import java.util.ArrayList;
import java.util.List;

import android.graphics.drawable.Drawable;
import android.graphics.drawable.LevelListDrawable;

public class ListViewItemData {

	private List<String> mFileName = new ArrayList<String>();
	private int mCount;
	private LevelListDrawable mLevelListDrawable;

	public ListViewItemData(LevelListDrawable levelListDrawable,
			List<String> list, int count) {
		getData(levelListDrawable,list, count);
	}

	protected void getData(LevelListDrawable levelListDrawable, List<String> fileName,
			int count) {
		mLevelListDrawable = levelListDrawable;
		mFileName = fileName;
		mCount = count;

	}

	public String getTitle(int index) {
		return mFileName.get(index).toString();
	}

	public Drawable getDrawable(int index) {
		mLevelListDrawable.setLevel(index);
		Drawable drawable = mLevelListDrawable.getCurrent();
		return drawable;
	}

	public int getCount() {
		return mCount;
	}
	
	// return the clicked item
	public Object getItem(int pos) {
		return (Object) mLevelListDrawable.getCurrent();
	}


	public String getName(int pos) {
		return mFileName.get(pos);
	}
	

}
